gridview: Make constructor arguments nullable
authorMatthias Clasen <mclasen@redhat.com>
Thu, 3 Sep 2020 18:18:41 +0000 (14:18 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 3 Sep 2020 18:20:06 +0000 (14:20 -0400)
I forgot to adjust the precondition when copying things
around.

gtk/gtkgridview.c

index 5e3af58f5b5d9733c01e64ce8d47d35266c63313..f20c34ba84308ee6623820c20661a5acacdeb270 100644 (file)
@@ -1200,7 +1200,7 @@ gtk_grid_view_new (GtkSelectionModel  *model,
   GtkWidget *result;
 
   g_return_val_if_fail (model == NULL || GTK_IS_SELECTION_MODEL (model), NULL);
-  g_return_val_if_fail (GTK_IS_LIST_ITEM_FACTORY (factory), NULL);
+  g_return_val_if_fail (factory == NULL || GTK_IS_LIST_ITEM_FACTORY (factory), NULL);
 
   result = g_object_new (GTK_TYPE_GRID_VIEW,
                          "model", model,